<div class="mder-page-sidebar">

     {#{{ dump(_globals.page)  }} #}
  {% if sidebarData is iterable %}
    <h3>this is list </h3>
    <nav class="mder-list">
      <ul class="nav nav-primary">
      {% for key,listItem in sidebarData %}

        {% if listItem.items is defined and listItem.items is iterable %}
          <li data-list-index="{{ key }}">
          {% if listItem.title is defined %}
            <a href="#sidebar-list-{{ key }}" data-toggle="collapse" class="mder-list-title"
            aria-controls="sidebar-list-{{ key }}"
            aria-expanded="true">
              <span class="glyphicon glyphicon-th-list"></span>
              <strong>{{ listItem.title }}</strong><span class="glyphicon glyphicon-chevron-down" style="float: right;"></span>
            </a>
          {% endif %}
            <ul class="nav collapse in" id="sidebar-list-{{ key }}">
              {% for item in listItem.items %}
                <li class="{% if _globals.config.urls.route == item.url %}active{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
              {% endfor %}
            </ul>
          </li>

        {% else %}
           <li class="{% if _globals.config.urls.route == listItem.url %}active{% endif %}"><a href="{{ listItem.url }}">{{ listItem.title }}</a></li>
        {% endif %}

      {% endfor %}
      </ul>
    </nav>
  {% else %}
    No sidebar data.
  {% endif %}
</div>
